); 5 If (hdisc = invalid_handle_value) 6 {7 // failed to open the device 8 return 0; 9} 10 // read 11 setfilepointer (hdisc, 0, 0, file_begin); 12 // number of bytes to be read 13 DWORD dwnumber2read = 512; 14 // Number of actually read bytes 15 DWORD dwrealnumber; 16 // allocate the buffer 17 char * buffer = new char [512]; 18 bool Bret = readfile (hdisc, buffer, dwnumber2read, dwrealnumber, null ); 19 20 // run the tail scan to release the buffer and close the handle 21 Delete [] buffer; 22
DNS is used whenever you use the Internet. Every time you send an email or surf the internet, you must rely on DNS. DNS is responsible for the ing between host names and interconnected network addresses, which is handled by computers. If the connection to the DNS server is delayed, or if the DNS server resolves an address too long, the access will be delayed. If domain name resolution can be accelerated in some way, the speed of surfing the Internet can be accelerated. The following describes a
Some friends may already know the opendns service, but I did know it through a foreigner's blog today. This website provides free DNS resolution, which is faster, safer, and smarter than the average ISP:
FasterThe two features ensure that opendns is faster. First, it has a large and intelligent cache, which ensures that users can make profits from the huge opendns
DNS is used whenever you use the Internet. Every time you send an email or surf the web, you have to rely on DNS. DNS is responsible for mapping between host names and Internet addresses, which is handled by the computer, and latency occurs if the process of connecting to a DNS server is delayed or if the DNS server resolves an address for an excessive length of time. And if you can speed up domain resolution in some way, you can speed up surfing the internet, here is an acceleration method: use
DNS is used whenever you use the Internet. Every time you send an email or surf the web, you have to rely on DNS. DNS is responsible for mapping between host names and Internet addresses, which is handled by the computer, and latency occurs if the process of connecting to a DNS server is delayed or if the DNS server resolves an address for an excessive length of time. And if you can speed up domain resolution in some way, you can speed up surfing the internet, here is an acceleration method: use
anyone who wants to learn. Today, we can all connect to the Internet.
But you must remember that when you connect to the Internet, your computer becomes the target of an attack. Become the target of viruses, Trojans, and other programs.
For this reason, it is recommended that anti-virus and anti-spyware be used to protect computers connected to the Internet. In some cases, even using these software cannot completely guarantee your security. It is always a good idea to add another security layer
Use the hosts file on the local machine to solve the problem of slow opendns
Because the Gae part of GFW can be solved temporarily by using opendns, but sometimes it is intolerable to use opendns to resolve the slow speed of domestic websites. However, in order to access x.appspot.com, you have to set the DNS server to the o
First, analyze the hard disk 0 head 0 cylinder 1 sector, that is, MBR (Main Boot Record). It starts from 0x1be, and 16 bytes is a data structure called partition information, for the specific format, see the following instance program. Generally, there are no more than 4 instances.
The first and last CHS parameters of each partition can be obtained in this data structure to facilitate reading of each partition.
The data volume is small, and the instance program requires ccdos Chinese support. Th
(BpB. The concept of cluster is only applicable to data areas.
(1) "cluster" is the smallest unit for DOS distribution.
(2) Different storage media, hard disks of different capacities, DOS versions, and cluster sizes are also different.
(3) The concept of cluster is only applicable to data areas.
3. Sector number definition: absolute sector and DOS sector
As described above, we can use a cylindrical/head/sector to uniquely locate each area on the dis
: continue to use the NT System disc to start the installation system to drive C.
Step 3: Enter the NT System after installation. Open my computer, right-click drive D, and select "format" (the file format is still FAT32 ). After formatting, copy a few files to drive d to view the formatting result.
Step 4: Start the system with a DOS disk after restart, and format the D disk with the format command: A:/> Format D: Or a:/> Format D:/Q
Step 5: restart. fault: all data on drive C is lost, and driv
a bug in the simulation program of grub for DOS 0.2.x, writing data to other sectors of the hard disk may cause serious problems such as data damage and startup failure !).
For floppy disk specifications: the technical problem to be solved is how to properly handle the Three-dimensional Geometric address, that is, the common description of CHS (c -- Magnetic Track cylinder number; h -- head number; S -- fan area number ). These specifications are available for both the actual software drive and
In XP, I had a long time ago when I was very upset with the DNS hijacking of China Telecom. I always transferred Google.com to Google.cn, and got the wrong domain name and gave it a "114 search". The entire super hooligans of China Telecom. Therefore, in XP, it is easy to set all DNS servers as OpenDNS servers. It is also very easy to set in Ubutu. You can also set it in Ubuntu, such as "Main Menu", "system", "system management", and "network". In "DN
NTFS is a much more complex file system than fat. Let's work together to fully interpret it.
The NTFS boot sector also completes the boot and defines the partition parameters. Unlike the FAT partition, if the Boot Record of the FAT partition is normal, no partition error is displayed, even if the file is incorrect, the boot of the NTFS partition is not a sufficient condition for the partition. It requires that the partition can be accessed normally only after the system records in the MFT, such
Document directory
2.1 DBR Composition
Composition of 2.2 BPB (BiOS parameter block)
1. How is the TF card space allocated?
The following uses a 4 gb tf card as an example to analyze its space distribution using the winhex tool, as shown in:
FAT32 manages directories as files, so there is no independent directory area. All file directory items are in the data area.
2. Start the sector (DBR)
DBR (DOS Boot Record, DOS Boot Record), in the cylindric
NTFS is a much more complex file system than fat. Let's work together to fully interpret it.
The NTFS boot sector also completes the boot and defines the partition parameters. Unlike the FAT partition, if the Boot Record of the FAT partition is normal, no partition error is displayed, even if the file is incorrect, the boot of the NTFS partition is not a sufficient condition for the partition. It requires that the partition can be accessed normally only after the system records in the MFT, such
file system, which contains the directory area.I. Analysis of DBR in the FAT32 file systemThe DBR of the FAT32 file system consists of 5 parts, namely jump instruction, OEM code, BPB, boot program and end sign. As a complete FAT32 file system DBR.(For example, I'm using a 4G SD card formatted as FAT32.)Jump instruction: itself occupies 2 bytes It jumps the program execution process to the bootloader.OEM Code: This section accounts for 8 bytes, and it
Debug Notes:First step: Read the physical sector 0.The four bytes starting from offset 0X1CA (458) are: 0x7,0x5b,0x1e,0x00;And the number of sectors is: 0x1e5b07=. Each sector is 512 bytes. So the SD card capacity is: *512/1024/1024mbyteThe 4 bytes starting from offset 0x1c6=454 are: 0xf9,0x00,0x00,0x00, which indicates that the boot sector is in the 0xf9=249 sector. Get the SD card more detailed information, 0 sectors will not be the tube.
/*unsigned long range=0; You can find the
FAT32 file system, which contains the directory area.
I. Analysis of DBR in the FAT32 file system
The DBR of the FAT32 file system consists of 5 parts, namely jump instruction, OEM code, BPB, boot program and end sign. The following figure is a complete FAT32 file system for DBR.
Jump instruction: itself occupies 2 bytes It jumps the program execution process to the bootloader.
OEM Code: This section accounts for 8 bytes, and its content is specifi
first picture: All is 16 binary, looks like the heavenly book ha! It doesn't matter, I slowly come to the road. DBR = JMP + OEM + BPB + Bootstrap + Finish It seems not difficult to look, we continue to chit chat when haha. 1> JMP Jump instructions, learn the assembly instructions are easy to understand, (plain English: is the two-byte assembly instruction, JMP 3C) then 3C after the 90 is what? I feel good fun ah, untie the truth, Nop Ah, is an empty
Tags: disk restore MBR DBR CHS parameterRecently in the backup, restore test of the disk, use the DeviceIoControl in WindowsAPI to back up, restore the disk layout, and then sequentially, in the corresponding order, copy the data from each partition of the source disk, but when you start the target disk as the startup disk, The screen appears with a black screen and a blinking cursor, viewing the data as a problem with the MBR being destroyed. Use Winhex to view the MBR of the target disk, boot
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.